package com.itbaizhan.shopping_common.result;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @program: shopping
 * @ClassName BaseException
 * @description:自定义业务异常
 * @author: jing
 * @create: 2025-06-12 22:47
 **/

@AllArgsConstructor
@Data
@NoArgsConstructor
public class BaseException extends RuntimeException{
    private Integer code;
    private String msg; //错误消息

    public BaseException(CodeEnum codeEnum){
        this.code = codeEnum.getCode();
        this.msg = codeEnum.getMessage();
    }
}
